<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<%
 String context = request.getContextPath();
%>
				
				<div id="content">
					<div class="post">
						<h2 class="title"><a href="#">Explorar</a></h2>
						<div style="clear: both;">&nbsp;</div>
						<div class="entry">
							<c:if test="${empty albums}">
								No existen álbums.
							</c:if>
							<c:if test="${not empty albums}">
								<c:forEach items="${albums}" var="album">
									<div class="album-resumen">
										<img src="<%=context%>/imagen/${album.persona.user.username}/${album.nombre}/${album.fotos[0]}" class="image-profile"/>
										<p><a href="<%=context%>/perfil/${album.persona.id}/${album.persona.user.username}/album/${album.id}/${album.nombre}">${album.nombre}</a></p>
										<p>Fotos: ${fn:length(album.fotos)}</p>
									</div>
								</c:forEach>
							</c:if>
						</div>
					</div>
					<div style="clear: both;">&nbsp;</div>
				</div>